<template>
  <div>
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>系统中心</el-breadcrumb-item>
      <el-breadcrumb-item>资金管理</el-breadcrumb-item>
      <el-breadcrumb-item>充值记录</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>
    <el-row>
      <el-form :model="userForm" label-width="70px">
        <el-col :span="5">
          <el-form-item label="流水号">
            <el-input placeholder="" v-model="userForm.tradeNo"></el-input>
          </el-form-item>
        </el-col>
      </el-form>
      <el-button type="info" plain @click="search()">搜索</el-button>
    </el-row>

    <el-table
      :data="biaolist"
      style="width: 100%">
      <el-table-column
        type="index"
        label="编号"
        align="center">
      </el-table-column>
      <el-table-column
        prop="usertype"
        label="充值人类型"
        align="center">
        <template slot-scope="scope">
          {{scope.row.userType| chageusertype}}
        </template>
      </el-table-column>
      <el-table-column
        prop="userId"
        label="充值人id"
        align="center">
      </el-table-column>
      <el-table-column
        prop="type"
        label="充值方式"
        align="center">
        <template slot-scope="scope">
          {{scope.row.type| chagetype}}
        </template>
      </el-table-column>
      <el-table-column
        prop="actiontime"
        label="操作时间"
        align="center">
        <template slot-scope="scope">
          {{scope.row.actionTime| datefmt('YYYY-MM-DD HH:mm:ss')}}
        </template>
      </el-table-column>
      <el-table-column
        prop="amount"
        label="金额"
        align="center">
      </el-table-column>
      <el-table-column
        prop="channeltype"
        label="支付类型"
        align="center">
        <template slot-scope="scope">
          {{scope.row.channelType| chagechanneltype}}
        </template>
      </el-table-column>
      <el-table-column
        prop="tradeNo"
        label="交易流水号"
        align="center">
      </el-table-column>
      <el-table-column
        prop="arriveTime"
        label="到账时间"
        align="center">
        <template slot-scope="scope">
          {{scope.row.arriveTime| datefmt('YYYY-MM-DD HH:mm:ss')}}
        </template>
      </el-table-column>
      <el-table-column
        prop="dingdan_code"
        label="订单编号"
        align="center">
      </el-table-column>
      <el-table-column
        align="center"
        label="操作">
        <template slot-scope="scope">
          <el-dropdown size="mini" split-button type="primary" trigger="click">
            操作
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item @click.native="shenghe(scope.row.id)">充值审核</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      align="center"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page.pagenum"
      :page-sizes="[5, 10, 15, 20]"
      :page-size="page.pagesize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
    </el-card>
  </div>
</template>
<script>
  export default {
    name: "recharge",
    data(){
      return{
        biaolist:[],
        AddScore:{},
        ScoredialogFormVisible:false,
        page:{
          pagenum:0,
          pagesize:5
        },
        status:'1',
        isShow:false,
        total:0,
        fullName:'',
        userid:'',
        rolelist:[],
        roleIds:{},
        centerDialogVisible:false,
        userDialogVisible:false,
        importExcelVisible:false,
        auth:{token:''},
        userForm:{},
        BorrowerId:null,
      }
    },
    methods:{
      handleSizeChange:function (val) {
        this.page.pagesize=val;
        this.search();
      },
      handleCurrentChange:function (val) {
        this.page.pagenum=val;
        this.search();
      },
      search:function () {
        this.$http.post("/finance-service-user/accountlog/getAccountLogList/"+this.page.pagenum+"/"+this.page.pagesize,this.userForm).then(
          (res)=>{
            this.biaolist=res.data.result.list;
            this.total=res.data.result.total;
          }
        )
      },
    },
    filters:{
      chageusertype:function (val) {
        if (val==0){
          return "投资人";
        }
        if (val==1){
          return "借款人"
        }
      },
      chagetype:function (val) {
        if (val==0){
          return "充值";
        }
        if (val==1){
          return "提现";
        }
      },
      chagechanneltype:function (val) {
        if (val==0){
          return "支付宝";
        }
        if (val==1){
          return "微信";
        }
        if (val==2){
          return "招商网银";
        }
      },
    },
    mounted() {
      this.search();
      this.auth.token=sessionStorage.getItem("token");
    }
  }
</script>

<style scoped>

</style>

